<?php

namespace app\common\validate;

use think\Validate;

class Video extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'	=>	['规则1','规则2'...]
     *
     * @var array
     */	
	protected $rule = [
	    'cateValue' => ['require','array'],
	    'ucid' => ['array'],
	    'title' => ['require','max' => 250],
	    'abstract' => ['require','max'=>300],
	    'tagSelected' => ['array']
	    
	];
    
    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */	
    protected $message = [
        'cateValue.require' =>'主页分类不能为空',
        'cateValue.array' =>'主页分类参数错误',
        'title.require' =>'标题不能为空',
        'abstract.require' =>'简介不能为空'
        
    ];
    
    protected $scene = [
        'base'  =>  ['cid','title','abstract'],
    ];
}
